//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    headImg:null,
    nickname:null
  },
  onLoad: function () {
    if(app.globalData.userInfo){
      this.setData({
        nickname:app.globalData.userInfo.nickname,
        headImg:app.globalData.userInfo.headimg
      })
    }
  }
})
